﻿using Ideaa.Domain.Models.Base;
using Ideaa.Domain.Models.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Ideaa.Domain.Models.Idea
{
    public class Idea : PostEntity, IAggregateRoot  
    {
        // Constructors
        public Idea(string createdUserId, string title, string content, int id = 0)
            : base(createdUserId, title, content, id)
        {
        }

        /// <summary>
        /// Do not use this constructor. It is reserved for internal use e.g AutoMapper mappings
        /// </summary>
        public Idea()
            : base(null, null, null)
        {

        }

        // Public Methods
        public Suggestion AddSuggestion(string createdUserId, string title, string content)
        {
            Suggestion suggestion = new Suggestion(createdUserId, title, content, this.Id);

            return suggestion;
        }
    }
}
